﻿using DocumentFormat.OpenXml.Lite.Core.Interfaces;
using DocumentFormat.OpenXml.Lite.Core.Office;
using DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Base;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.WordprocessingML.Word.Table
{
    [XmlRoot("tblGridChange", Namespace = Constants.WordMain)]
    public class GridChange : XmlSerializable, IOfficeElement
    {
        [XmlIgnore]
        public Guid DocumentId { get; set; }

        [XmlAttribute("id", Namespace = Constants.WordMain, Form = XmlSchemaForm.Qualified)]
        public int Id { get; set; }

        [XmlElement]
        public TableGrid Grid
        {
            get { return grid; }
            set { grid = value; grid.DocumentId = this.DocumentId; }
        }

        [XmlIgnore]
        private TableGrid grid;

        public GridChange() { }
    }
}
